import request from '@/utils/request'
////////////////////////////// 合同审批
export function submit(data) {
  return request({
    url: 'buss/contract/submit',
    method: 'post',
    data
  })
}

export function resubmit(data) {
  return request({
    url: 'buss/contract/resubmit',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'buss/contract/delete',
    method: 'post',
    data: ids
  })
}


export function performancePersondel(ids) {
  return request({
    url: 'buss/performanceperson/del',
    method: 'post',
    data: ids
  })
}


export function getOne(id) {
  return request.get('buss/contract/getOne?id='+id)
}

export function getTablePage(data) {
  return request.post('buss/contract/paging', data)
}

export function getCompanyByUser() {
  return request.post('buss/contract/getCompanyByUser')
}

export function getCompanyByUserWithId(data) {
  return request.post('buss/contract/getCompanyByUser?id='+data)
}

export function getDeptByCompany(data) {
  return request.post('buss/contract/getDeptByCompany?id='+data)
}

export function getProjectsByCompanyId(data) {
  return request.post('buss/contract/getProjectsByCompanyId?id='+data)
}

export function getContractPayVo(id) {
  return request.post('buss/contract/getContractPayVo?id='+id)
}


export function importExcel(data) {
  return request.post('buss/performanceperson/importPerformancePersonExcel', data)
}

export function safetyProjectListImportExcel(data) {
  return request.post('buss/safetyProjectList/importSafetyProjectList', data)
}

export function exportExcel(data) {
  return request.post('buss/performanceperson/exportPerformancePersonData', data,{responseType:'blob'})
}


export function serviceContractMeasure(data) {
  return request.post('buss/contract/serviceContractMeasure', data)
}


////////////////////////////// 合同审批



export default {
  submit,
  resubmit,
  getOne,
  del,
  getTablePage,
  getCompanyByUser,
  getCompanyByUserWithId,
  getDeptByCompany,
  getProjectsByCompanyId,
  getContractPayVo,
  ////////////////////////////// 合同审批
  performancePersondel,
  importExcel,
  safetyProjectListImportExcel,
  exportExcel,
  serviceContractMeasure

}
